package com.wechat.back.service.impl;

import com.wechat.back.service.SensitiveWordService;
import com.wechat.back.utils.ACF.ACFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SensitiveWordServiceImpl implements SensitiveWordService {
    @Autowired
    private ACFilter acFilter;

    public void loadSensitiveWord(List<String> sensitiveWords) {
        acFilter.loadSensitiveWord(sensitiveWords);
    }

    public String filter(String text) {
        return acFilter.filter(text);
    }

    public boolean hasSensitiveWord(String text) {
        return acFilter.hasSensitiveWord(text);
    }
}
